<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="java.text.SimpleDateFormat" %>
<%@ page import="java.util.Date" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>   
<%
    SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
    String date= format.format(new Date());
%>
<%@ include file="/WEB-INF/JSP/backHome/modalWindows/StudentsListExamOderPage.jsp"%> 

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="<%=path%>/My97DatePicker/WdatePicker.js"></script>
<link rel="stylesheet" type="text/css" href="<%=path%>/CSS/backLayout.css">
<link rel="stylesheet" type="text/css" href="<%=path%>/CSS/bombBox.css" >
	<script type="text/javascript" src="<%=path%>/common/stopBrowerBack.js"></script>
</head>
<style>
tr td:nth-child(1){
color: black;
font-size: inherit;
}
#tablelist  td{height: 40px;padding-bottom: 10px;padding-top: 5px;padding-right: 10px}
.div_form table input {
	width: 150px;height: 32px
}
.clazzData{
	margin-top: 10px;
}
</style>
<body style="background: #f5f5f5">

<div class="main" >
			<div id="modal-overlay">
			    
			</div>

			<div class="modal-data1" >
				<div style="height: 60px">
				 <ul>
				  	<li  style="text-align: left;margin-left: 60px;height: 40px;line-height: 40px">
				  		<span>名称：</span>
				  		<span>
				  		 	<input class="name" type="text" >
				  		</span>
				  		<span>
				  			<button class="findBtn">
				  				查询
				  			</button>
				  		</span>
				  	</li>
				 </ul>
				</div>
				<div style="width:100%; height:350px; overflow:scroll;">
			      <form action="">
			        <table class="head1"  style="width: auto;white-space:nowrap;border-spacing:0px;">
			        <tr style="background: #f2f2f2;height: 30px;line-height: 20px;" class="sel">
			        <td style="width: 20px"></td> 
			        <td>
			        	编码
			        </td>
			        <td>
			        	名称
			        </td>
			        <td>
			        	金额
			        </td>
			        <td>
			        	简称
			        </td>
			        <td>
			        	描述
			        </td>
			        <td>
			        	创建时间
			        </td>
			        <td>
			        	用户名
			        </td>
			        <td>
			        	最后修改时间
			        </td>
			        <td>
			        	用户名
			        </td>
			        <td>
			        	财务组织
			        </td>
			        <td>
			        	适用车辆
			        </td>
			        <td>
			        	是否包考试费
			        </td>
			        <td>
			        	是否包练车
			        </td>
			        <td>
			        	VIP
			        </td>
			        <td>
			        	特训班
			        </td>
			        <td>
			        	状态
			        </td>
			        </tr>
			        <c:forEach items="${clazzs}" var="clazz" >
                            <tr style="margin-top: 45px;height: 30px" class="clazzData" >
			        		<td>
			        		 	<input style="width: 15px;height: 15px" type="checkbox" name="train"  value="${clazz.fid}">
			        		</td>
			        		<td>${clazz.fnumber}</td>
			        		<td>${clazz.fnameL2}</td>
			        		<td>${clazz.cfprice}</td>
			        		<td>${clazz.fsimplename}</td>	
			        		<td>${clazz.fdescriptionL2}</td>
			        		<td>${clazz.fcreatetime}</td>		
			        		<td>${clazz.createName}</td>
			        		<td>${clazz.flastupdatetime}</td>	
			        		<td>${clazz.updateName}</td>		
			        		<td>${clazz.cfficompanyName}</td>
			        		<td>${clazz.cfsycl}</td>	
			        		<c:if test="${clazz.cfksf ne 1}">
			        		<td><input style="width: 15px;height: 15px" type="checkbox" disabled="disabled"></td>		
			        		</c:if>	
			        		<c:if test="${clazz.cfksf eq 1}">
			        		<td><input style="width: 15px;height: 15px" type="checkbox" checked="checked" disabled="disabled"></td>		
			        		</c:if>	
			        		<c:if test="${clazz.cflc ne 1}">
			        		<td><input style="width: 15px;height: 15px" type="checkbox" disabled="disabled"></td>		
			        		</c:if>	
			        		<c:if test="${clazz.cflc eq 1}">
			        		<td><input style="width: 15px;height: 15px" type="checkbox" checked="checked" disabled="disabled"></td>		
			        		</c:if>	
			        		<c:if test="${clazz.cfvip ne 1}">
			        		<td><input style="width: 15px;height: 15px" type="checkbox" disabled="disabled"></td>		
			        		</c:if>	
			        		<c:if test="${clazz.cfvip eq 1}">
			        		<td><input style="width: 15px;height: 15px" type="checkbox" checked="checked" disabled="disabled"></td>		
			        		</c:if>	
			        		<c:if test="${clazz.cftx ne 1}">
			        		<td><input style="width: 15px;height: 15px" type="checkbox" disabled="disabled"></td>		
			        		</c:if>	
			        		<c:if test="${clazz.cftx eq 1}">
			        		<td><input style="width: 15px;height: 15px" type="checkbox" checked="checked" disabled="disabled"></td>		
			        		</c:if>	
			        		<td>启用</td>
			        	</tr>
			        	</c:forEach>
			        </table>
			      </form>
			      <button class="subtn1" style="width: 150px;position: absolute;bottom: 25px;font-size: 16px;left: 280px" >
			      	确定
			      </button>
			      <button class="btn" style="width: 150px;position: absolute;bottom: 25px;font-size: 16px;right: 280px" >
			      	关闭
			      </button>
			      </div>
			</div>
			
	<div class="weizhi">
		预约管理>>考试预约>>详情
	</div>
	<div class="div_body" style="min-height: 800px;">
	
		
		<c:if test="${flag eq 1 }">
		<div class="div_form" style="margin: 0 20px;width: auto;">
			<form id="form" action="<%=path%>/DrivingSys/saveExamOrder" method="post" class="form">
				<table id="tablelist" style="margin-top: 40px;" >
				 	<tr  >
				 		<td rowspan="5" style="padding-right: 20px" >
				 			<img  class="photo" id="images" width="180px" height="200px" src="sel">
				 		</td>
				 		<td >驾校:</td>
				 		<td>
				 		<input  type="text" value="${department.fnameL2}"  disabled="disabled" style="color: gray;"/>
				 		<input type="hidden" name="cfficompanyid"  value="${department.fid}" >
				 		</td>
				 		<td>考试类型:</td>
				 		<td>
				 			<select style="width: 150px;height: 32px" class="cfbilltype" name="cfbilltype">
							 	<option selected="selected" value="2" style="font-size: 16px">科目一考试预约</option>
							 	<option value="3" style="font-size: 16px">科目二考试预约 </option>
							 	<option value="4" style="font-size: 16px">科目三考试预约</option>
							</select>
				 		</td>
				 		<td >预约考试日期:</td>
				 		<td >
						<input type="text" id="date" name="cfexamdate" value="<%=date%>"  onclick="WdatePicker({el:'date',dateFmt:'yyyy-MM-dd'})" >
				 		<span><img onclick="WdatePicker({el:'date',dateFmt:'yyyy-MM-dd '})"
								   src="<%=path%>/image/date.jpg"  align="absmiddle" style=""></span>
						</td>
				 	</tr>
				 	<tr>
				 		<td>单据编码:</td>
				 		<td><input  type="text" name="fnumber"   disabled="disabled" style="color: gray;"/></td>
				 		<td>学员编码:</td>
				 		<td><input  type="text" class="student" name="cfstudentno"  value=""  style="color: gray;"/>
							<span style="font-size: 14px;padding-left: 5px;color:#FF4D64">必填</span>
						</td>
				 		<td>学员名称:</td>
				 		<td>
						<input  type="text" class="cfstudentname" disabled="disabled"  style="color: gray;"/>
							<input type="hidden" class="cfstudentid" name="cfstudentid"  value="" > 
							<input type="hidden" name="cfstudentname" class="cfstudentname" >
				 		</td>
				 	</tr>
				 	<tr class="notTr">
				 		<td></td>
				 		<td><input   type="checkbox" id="cfvip"  style="color: gray;float: left;width: 30px;height:15px"/>
				 		<input type="hidden"  name="cfvip"  class="cfvip" >
				 		<div style="height: 30px;display:table-row-group;float: left;margin-top: -2px ">VIP</div>
				 		</td>
				 		<td>班级:</td>
				 		<td class="clazz">
							<input type="text" class="cfclazzName"  value=""  />
							<input type="hidden" name="cfclazzid"  class="cfclazzid" value="" >
							<span style="font-size: 14px;padding-left: 5px;color:#FF4D64">必填</span>
						</td>
				 		<td>预约结果:</td>
				 		<td>
				 			<select style="width: 150px;height: 32px" name="cfsubscriberesult">
							 	<option value="1" selected="selected" style="font-size: 16px">预约成功 </option>
							 	<option value="2" style="font-size: 16px">预约失败</option>
							</select>
				 		</td>				 		
				 	</tr>
				 	<tr>
				 		
				 		<td>申请准驾车型:</td>
				 		<td>
				 			<select style="width: 150px;height: 32px" disabled="disabled" >
							 	<option value="A1" style="font-size: 16px" class="cfsqzjcxdh">A1</option>
							</select>
							<input type="hidden" name="cfsqzjcxdh" class="cfsqzjcxdh"> 
						</td>
				 		<td>手机:</td>
				 		<td>
				 		<input  type="text"  class="cfmobile" disabled="disabled" style="color: gray;"/>
				 		<input type="hidden" name="cfmobile" class="cfmobile"> 
				 		</td>
				 		<td>下一次预约日期:</td>
				 		<td >
				 		<input type="text" id="cfbirthday" name="cfnexttime"  onclick="WdatePicker({el:'cfbirthday',dateFmt:'yyyy-MM-dd'})" >
				        <span>
							<img onclick="WdatePicker({el:'cfbirthday',dateFmt:'yyyy-MM-dd'})"
								 src="<%=path%>/image/date.jpg"  align="absmiddle" style="padding-left: -15px">
						</span>
						</td>
				 	</tr>
				 	<tr>
				 		<td>电话:</td>
				 		<td>
				 		<input  type="text" name="cfphone" class="cfphone" disabled="disabled" style="color: gray;"/>
				 		<input type="hidden" name="cfphone" class="cfphone"> 
				 		</td>
				 		<td>应收:</td>
				 		<td><input  type="text" name="cfamount"  class="cfamount" disabled="disabled" style="color: gray;"/>
				 		<input type="hidden" name="cfamount" class="cfamount"> 
				 		</td>
				 		<td>已收:</td>
				 		<td>
							<input  type="text" name="cfreceived" class="cfreceived" disabled="disabled" style="color: gray;"/>
							<input type="hidden" name="cfreceived" class="cfreceived"> 
				 		</td>
				 	</tr>
				 	<tr>
				 		<td rowspan="5"></td>
				 		<td>优惠:</td>
				 		<td>
							<input  type="text" name="cffavorable" class="cffavorable" disabled="disabled" style="color: gray;"/>
							<input type="hidden" name="cffavorable" class="cffavorable"> 
				 		</td>
				 		<td>欠费:</td>
				 		<td>
							<input  type="text" name="cfarrearage" class="cfarrearage" disabled="disabled" style="color: gray;"/>
							<input type="hidden" name="cfarrearage" class="cfarrearage"> 
				 		</td>
				 		<td>车型:</td>
				 		
				 		<td>
				 		<input type="hidden" name="cfcarbyte" class="cfcarbyte"> 
				 		<select disabled="disabled" style="width: 150px;height: 32px" >
							 	<option class="cfcarbyte" style="font-size: 16px">小车</option>						 	
						</select>
						
					</td>
				 	</tr>
				 	<tr>
				 		<td>身份证号码:</td>
				 		<td>
				 			<input  type="text" readonly="readonly" class="cfidcardno" name="cfidcardno" value=""  style="color: gray;"/>
				 		</td>
				 		<td>性别:</td>
				 		<td>
				 			<select style="width: 150px;height: 32px" name="cfsex" >
							 	<option class="cfsex1"  value="1" style="font-size: 16px">男</option>
							 	<option class="cfsex2" value="2" style="font-size: 16px">女</option>
							</select>
				 		</td>
				 		<td>推荐人:</td>
				 		<td >
				 			<input  type="text" name="cftjr" class="cftjr" value=""  style="color: gray;"/>
							<span style="font-size: 14px;padding-left: 5px;color:#FF4D64">必填</span>
				 		</td>
				 	</tr>
				 	<tr class="notTr" >
				 		<td>初考/补考:</td>
				 		<td>
				 			<select  style="width: 150px;height: 32px" name="cfckbk" id="cfckbk">
							 	<option value="1" style="font-size: 16px">初考</option>
							 	<option value="2" style="font-size: 16px">补考</option>
							</select>
				 		</td>
				 		<td></td>
				 		<td><input  type="checkbox"  id="cfjnbjj"   style="color: gray;float: left;width: 30px;height:15px"/>
				 		<input type="hidden" class="cfjnbjj"   name="cfjnbjj" > 
				 		<div style="height: 30px;float: left;margin-top: -2px">技能表交接</div>
				 		</td>
				 		<td></td>
				 		<td colspan="2"><input  type="checkbox"  id="cfdajj"  style="color: gray;float: left;width: 30px;height:15px"/>
				 		<input type="hidden"  class="cfdajj"  name="cfdajj"  > 
				 		<div style="height: 30px;float: left;margin-top: -2px">档案交接</div>
				 		</td>
				 		<td></td>
				 	</tr>
				 	<tr>
				 		<td>备注:</td>
				 		<td colspan="2">
				 			<textarea name="cfremark" class="remark" rows="5" cols="48"></textarea>
				 		</td>
				 	</tr>
				 	<tr>
				 		<td>创建者:</td>
				 		<td>
				 			<input  type="text" name="name" disabled="disabled" style="color: gray;"/>
				 		</td>
				 		<td>创建时间:</td>
				 		<td colspan="2">
				 			<input  type="text" name="cfaddress" disabled="disabled" value=""  style="color: gray;"/>
				 		</td>
				 	</tr>
					<input class="state" name="state" type="hidden" value="1" >
				</table>
		<div class="div_tj" style="height: 100px;margin-top: 30px;padding-left: 180px" >
					<div>
						<input type="submit" onclick="return submitCheck()" class="input_submit bc" value="" style="margin-right: 30px;margin-top: 0px">
					</div>
					<div>
						<input type="button" class="input_submit fh" value="" style="margin-top: 0px"/>
					</div>
				</div>
			</form>
		</div>
		
		</c:if>
		
		
		
		<!-- 修改页面-->
		
		
		
		<c:if test="${flag eq 2 }">
			<div class="div_form" style="margin: 0 20px;width: auto;">
			<form id="form" action="<%=path%>/DrivingSys/updateExamOrder" method="post" class="form">
				<table id="tablelist" >
				 	<tr>
				 		<td rowspan="5" style="padding-right: 20px" >
				 			<img  class="photo" width="150px" id="images" height="150px" src="<%=path%>/DrivingSys/selectStudentPhoto">
				 		</td>
				 		<td >驾校:</td>
				 		<td>
				 		<input  type="text" value="${examOrder.cfficompanyName}"  disabled="disabled" style="color: gray;"/>
				 		<input type="hidden" name="cfficompanyid"  value="${examOrder.cfficompanyid}" >
				 		<input type="hidden" name="fid"  value="${examOrder.fid}">
				 		</td>
				 		<td>考试类型:</td>
				 		<td>


				 			<select style="width: 150px;height: 32px" class="cfbilltype" name="cfbilltype">
				 				<c:if test="${examOrder.cfbilltype eq 1}">
					 				<option value="1" selected="selected" style="font-size: 16px">模拟考预约 </option>
								 	<option value="2" style="font-size: 16px">科目一考试预约</option>
								 	<option value="3" style="font-size: 16px">科目二考试预约 </option>
								 	<option value="4" style="font-size: 16px">科目三考试预约</option>
				 				</c:if>
				 				<c:if test="${examOrder.cfbilltype eq 2}">
					 				<option value="1" style="font-size: 16px">模拟考预约 </option>
								 	<option value="2" selected="selected"  style="font-size: 16px">科目一考试预约</option>
								 	<option value="3" style="font-size: 16px">科目二考试预约 </option>
								 	<option value="4" style="font-size: 16px">科目三考试预约</option>
				 				</c:if>
				 				<c:if test="${examOrder.cfbilltype eq 3}">
					 				<option value="1" style="font-size: 16px">模拟考预约 </option>
								 	<option value="2" style="font-size: 16px">科目一考试预约</option>
								 	<option value="3" selected="selected" style="font-size: 16px">科目二考试预约 </option>
								 	<option value="4" style="font-size: 16px">科目三考试预约</option>
				 				</c:if>
				 				<c:if test="${examOrder.cfbilltype eq 4}">
					 				<option value="1" style="font-size: 16px">模拟考预约 </option>
								 	<option value="2" style="font-size: 16px">科目一考试预约</option>
								 	<option value="3" style="font-size: 16px">科目二考试预约 </option>
								 	<option value="4" selected="selected" style="font-size: 16px">科目三考试预约</option>
				 				</c:if>
							</select>
				 		</td>
				 		<td >预约考试日期:</td>
				 		<td>
						<input type="text" id="date" name="cfexamdate" value="${examOrder.cfexamdate}"  onclick="WdatePicker({el:'date',dateFmt:'yyyy-MM-dd'})" >
				 		<span>
							<img onclick="WdatePicker({el:'date',dateFmt:'yyyy-MM-dd '})"
								 src="<%=path%>/image/date.jpg"  align="absmiddle" style="padding-left: -15px">
						</span>
						</td>
				 	</tr>
				 	<tr>
				 		<td>单据编码:</td>
				 		<td>
							<input  type="text" value="${examOrder.fnumber}" name="fnumber"   disabled="disabled" style="color: gray;"/>
							<input type="hidden" name="fnumbers" value="${examOrder.fnumber}" >
						</td>
				 		<td>学员编码:</td>
				 		<td>
							<input  type="text" class="student" name="cfstudentno"  value="${examOrder.cfstudentno}"  style="color: gray;"/>
							<%--<input type="hidden" name="cfstudentno" value="${examOrder.cfstudentno}" >--%>
						</td>
				 		<td>学员名称:</td>
				 		<td>
						<input  type="text" value="${examOrder.cfstudentname}" class="cfstudentname" disabled="disabled"  style="color: gray;"/>
							<input type="hidden" class="cfstudentid" value="${examOrder.cfstudentid}" name="cfstudentid" >
							<input type="hidden" name="cfstudentname" class="cfstudentname" value="${examOrder.cfstudentname}" >
				 		</td>
				 	</tr>
				 	<tr class="notTr">
				 		<td></td>
				 		<td>
				 		<c:if test="${examOrder.cfvip ne 1}">
				 		<input   type="checkbox" id="cfvip"  style="color: gray;float: left;width: 30px;height:15px"/>
				 		<input type="hidden"  name="cfvip"  class="cfvip" >
				 		<div style="height: 30px;display:table-row-group;float: left;margin-top: -2px">VIP</div>
				 		</c:if>
				 		
				 		<c:if test="${examOrder.cfvip eq 1}">
				 		<input  checked="checked"  type="checkbox" id="cfvip"  style="color: gray;float: left;width: 30px;height:15px"/>
				 		<input type="hidden"  name="cfvip"  class="cfvip" >
				 		<div style="height: 30px;display:table-row-group;float: left;margin-top: -2px">VIP</div>
				 		</c:if>
				 		</td>
				 		
				 		<td>班级:</td>
				 		<td class="clazz">
							<input type="text" class="cfclazzName"  value="${examOrder.cfclazzName}"  /> 
							<input type="hidden" name="cfclazzid"  class="cfclazzid" value="${examOrder.cfclazzid}" > 
						</td>
				 		<td>预约结果:</td>
				 		<td>
				 			<select style="width: 150px;height: 32px" name="cfsubscriberesult">
				 			<c:if test="${examOrder.cfsubscriberesult eq 1}">
				 				<option value="1" selected="selected" style="font-size: 16px">预约成功 </option>
							 	<option value="2" style="font-size: 16px">预约失败</option>
				 			</c:if>
							<c:if test="${examOrder.cfsubscriberesult eq 2}">
				 				<option value="1" style="font-size: 16px">预约成功 </option>
							 	<option value="2" selected="selected" style="font-size: 16px">预约失败</option>
				 			</c:if>	
							</select>
				 		</td>				 		
				 	</tr>
				 	<tr>
				 		
				 		<td>申请准驾车型:</td>
				 		<td>
				 			<select disabled="disabled" style="width: 150px;height: 32px" >
				 				
				 				<c:if test="${examOrder.cfsqzjcxdh == 'A1'}">
									<option selected="selected" value="A1" style="font-size: 16px">A1</option>
								 	<option value="A2" style="font-size: 16px">A2</option>
								 	<option value="A3" style="font-size: 16px">A3</option>
								 	<option value="B1" style="font-size: 16px">B1</option>
								 	<option value="B2" style="font-size: 16px">B2</option>
								 	<option value="C1" style="font-size: 16px">C1</option>
								 	<option value="C2" style="font-size: 16px">C2</option>
								 	<option value="C3" style="font-size: 16px">C3</option>
								 	<option value="C4" style="font-size: 16px">C4</option>
								 	<option value="D" style="font-size: 16px">D</option>
								 	<option value="E" style="font-size: 16px">E</option>
								 	<option value="F" style="font-size: 16px">F</option>
								 	<option value="M" style="font-size: 16px">M</option>
								 	<option value="N" style="font-size: 16px">N</option>
								 	<option value="P" style="font-size: 16px">P</option>
								 	<option value=" " style="font-size: 16px"></option>
								</c:if>
								<c:if test="${examOrder.cfsqzjcxdh == 'A2' }">
									<option value="A1" style="font-size: 16px">A1</option>
								 	<option selected="selected" value="A2" style="font-size: 16px">A2</option>
								 	<option value="A3" style="font-size: 16px">A3</option>
								 	<option value="B1" style="font-size: 16px">B1</option>
								 	<option value="B2" style="font-size: 16px">B2</option>
								 	<option value="C1" style="font-size: 16px">C1</option>
								 	<option value="C2" style="font-size: 16px">C2</option>
								 	<option value="C3" style="font-size: 16px">C3</option>
								 	<option value="C4" style="font-size: 16px">C4</option>
								 	<option value="D" style="font-size: 16px">D</option>
								 	<option value="E" style="font-size: 16px">E</option>
								 	<option value="F" style="font-size: 16px">F</option>
								 	<option value="M" style="font-size: 16px">M</option>
								 	<option value="N" style="font-size: 16px">N</option>
								 	<option value="P" style="font-size: 16px">P</option>
								 	<option value=" " style="font-size: 16px" ></option>
								</c:if>
								<c:if test="${examOrder.cfsqzjcxdh == 'A3'}">
									<option value="A1" style="font-size: 16px">A1</option>
								 	<option value="A2" style="font-size: 16px">A2</option>
								 	<option  selected="selected"  value="A3" style="font-size: 16px">A3</option>
								 	<option value="B1" style="font-size: 16px">B1</option>
								 	<option value="B2" style="font-size: 16px">B2</option>
								 	<option value="C1" style="font-size: 16px">C1</option>
								 	<option value="C2" style="font-size: 16px">C2</option>
								 	<option value="C3" style="font-size: 16px">C3</option>
								 	<option value="C4" style="font-size: 16px">C4</option>
								 	<option value="D" style="font-size: 16px">D</option>
								 	<option value="E" style="font-size: 16px">E</option>
								 	<option value="F" style="font-size: 16px">F</option>
								 	<option value="M" style="font-size: 16px">M</option>
								 	<option value="N" style="font-size: 16px">N</option>
								 	<option value="P" style="font-size: 16px">P</option>
								 	<option value=" " style="font-size: 16px" ></option>
								</c:if>
								<c:if test="${examOrder.cfsqzjcxdh == 'B1'}">
									<option value="A1" style="font-size: 16px">A1</option>
								 	<option value="A2" style="font-size: 16px">A2</option>
								 	<option value="A3" style="font-size: 16px">A3</option>
								 	<option selected="selected" value="B1" style="font-size: 16px">B1</option>
								 	<option value="B2" style="font-size: 16px">B2</option>
								 	<option value="C1" style="font-size: 16px">C1</option>
								 	<option value="C2" style="font-size: 16px">C2</option>
								 	<option value="C3" style="font-size: 16px">C3</option>
								 	<option value="C4" style="font-size: 16px">C4</option>
								 	<option value="D" style="font-size: 16px">D</option>
								 	<option value="E" style="font-size: 16px">E</option>
								 	<option value="F" style="font-size: 16px">F</option>
								 	<option value="M" style="font-size: 16px">M</option>
								 	<option value="N" style="font-size: 16px">N</option>
								 	<option value="P" style="font-size: 16px">P</option>
								 	<option value=" " style="font-size: 16px"></option>
								</c:if>
								<c:if test="${examOrder.cfsqzjcxdh == 'B2'}">
									<option value="A1" style="font-size: 16px">A1</option>
								 	<option value="A2" style="font-size: 16px">A2</option>
								 	<option value="A3" style="font-size: 16px">A3</option>
								 	<option value="B1" style="font-size: 16px">B1</option>
								 	<option selected="selected" value="B2" style="font-size: 16px">B2</option>
								 	<option value="C1" style="font-size: 16px">C1</option>
								 	<option value="C2" style="font-size: 16px">C2</option>
								 	<option value="C3" style="font-size: 16px">C3</option>
								 	<option value="C4" style="font-size: 16px">C4</option>
								 	<option value="D" style="font-size: 16px">D</option>
								 	<option value="E" style="font-size: 16px">E</option>
								 	<option value="F" style="font-size: 16px">F</option>
								 	<option value="M" style="font-size: 16px">M</option>
								 	<option value="N" style="font-size: 16px">N</option>
								 	<option value="P" style="font-size: 16px">P</option>
								 	<option value=" " style="font-size: 16px"></option>
								</c:if>
								<c:if test="${examOrder.cfsqzjcxdh == 'C1'}">
									<option value="A1" style="font-size: 16px">A1</option>
								 	<option value="A2" style="font-size: 16px">A2</option>
								 	<option value="A3" style="font-size: 16px">A3</option>
								 	<option value="B1" style="font-size: 16px">B1</option>
								 	<option value="B2" style="font-size: 16px">B2</option>
								 	<option selected="selected" value="C1" style="font-size: 16px">C1</option>
								 	<option value="C2" style="font-size: 16px">C2</option>
								 	<option value="C3" style="font-size: 16px">C3</option>
								 	<option value="C4" style="font-size: 16px">C4</option>
								 	<option value="D" style="font-size: 16px">D</option>
								 	<option value="E" style="font-size: 16px">E</option>
								 	<option value="F" style="font-size: 16px">F</option>
								 	<option value="M" style="font-size: 16px">M</option>
								 	<option value="N" style="font-size: 16px">N</option>
								 	<option value="P" style="font-size: 16px">P</option>
								 	<option value=" " style="font-size: 16px"></option>
								</c:if>
								<c:if test="${examOrder.cfsqzjcxdh == 'C2'}">
									<option value="A1" style="font-size: 16px">A1</option>
								 	<option value="A2" style="font-size: 16px">A2</option>
								 	<option value="A3" style="font-size: 16px">A3</option>
								 	<option value="B1" style="font-size: 16px">B1</option>
								 	<option value="B2" style="font-size: 16px">B2</option>
								 	<option value="C1" style="font-size: 16px">C1</option>
								 	<option selected="selected" value="C2" style="font-size: 16px">C2</option>
								 	<option value="C3" style="font-size: 16px">C3</option>
								 	<option value="C4" style="font-size: 16px">C4</option>
								 	<option value="D" style="font-size: 16px">D</option>
								 	<option value="E" style="font-size: 16px">E</option>
								 	<option value="F" style="font-size: 16px">F</option>
								 	<option value="M" style="font-size: 16px">M</option>
								 	<option value="N" style="font-size: 16px">N</option>
								 	<option value="P" style="font-size: 16px">P</option>
								 	<option value=" " style="font-size: 16px"></option>
								</c:if>
								<c:if test="${examOrder.cfsqzjcxdh == 'C3'}">
									<option value="A1" style="font-size: 16px">A1</option>
								 	<option value="A2" style="font-size: 16px">A2</option>
								 	<option value="A3" style="font-size: 16px">A3</option>
								 	<option value="B1" style="font-size: 16px">B1</option>
								 	<option value="B2" style="font-size: 16px">B2</option>
								 	<option value="C1" style="font-size: 16px">C1</option>
								 	<option value="C2" style="font-size: 16px">C2</option>
								 	<option selected="selected" value="C3" style="font-size: 16px">C3</option>
								 	<option value="C4" style="font-size: 16px">C4</option>
								 	<option value="D" style="font-size: 16px">D</option>
								 	<option value="E" style="font-size: 16px">E</option>
								 	<option value="F" style="font-size: 16px">F</option>
								 	<option value="M" style="font-size: 16px">M</option>
								 	<option value="N" style="font-size: 16px">N</option>
								 	<option value="P" style="font-size: 16px">P</option>
								 	<option value=" " style="font-size: 16px"></option>
								</c:if>
								<c:if test="${examOrder.cfsqzjcxdh == 'C4'}">
									<option value="A1" style="font-size: 16px">A1</option>
								 	<option value="A2" style="font-size: 16px">A2</option>
								 	<option value="A3" style="font-size: 16px">A3</option>
								 	<option value="B1" style="font-size: 16px">B1</option>
								 	<option value="B2" style="font-size: 16px">B2</option>
								 	<option value="C1" style="font-size: 16px">C1</option>
								 	<option value="C2" style="font-size: 16px">C2</option>
								 	<option value="C3" style="font-size: 16px">C3</option>
								 	<option selected="selected" value="C4" style="font-size: 16px">C4</option>
								 	<option value="D" style="font-size: 16px">D</option>
								 	<option value="E" style="font-size: 16px">E</option>
								 	<option value="F" style="font-size: 16px">F</option>
								 	<option value="M" style="font-size: 16px">M</option>
								 	<option value="N" style="font-size: 16px">N</option>
								 	<option value="P" style="font-size: 16px">P</option>
								 	<option value=" " style="font-size: 16px"></option>
								</c:if>
								<c:if test="${examOrder.cfsqzjcxdh == 'D'}">
									<option value="A1" style="font-size: 16px">A1</option>
								 	<option value="A2" style="font-size: 16px">A2</option>
								 	<option value="A3" style="font-size: 16px">A3</option>
								 	<option value="B1" style="font-size: 16px">B1</option>
								 	<option value="B2" style="font-size: 16px">B2</option>
								 	<option value="C1" style="font-size: 16px">C1</option>
								 	<option value="C2" style="font-size: 16px">C2</option>
								 	<option value="C3" style="font-size: 16px">C3</option>
								 	<option value="C4" style="font-size: 16px">C4</option>
								 	<option selected="selected" value="D" style="font-size: 16px">D</option>
								 	<option value="E" style="font-size: 16px">E</option>
								 	<option value="F" style="font-size: 16px">F</option>
								 	<option value="M" style="font-size: 16px">M</option>
								 	<option value="N" style="font-size: 16px">N</option>
								 	<option value="P" style="font-size: 16px">P</option>
								 	<option value=" " style="font-size: 16px"></option>
								</c:if>
								<c:if test="${examOrder.cfsqzjcxdh == 'E'}">
									<option value="A1" style="font-size: 16px">A1</option>
								 	<option value="A2" style="font-size: 16px">A2</option>
								 	<option value="A3" style="font-size: 16px">A3</option>
								 	<option value="B1" style="font-size: 16px">B1</option>
								 	<option value="B2" style="font-size: 16px">B2</option>
								 	<option value="C1" style="font-size: 16px">C1</option>
								 	<option value="C2" style="font-size: 16px">C2</option>
								 	<option value="C3" style="font-size: 16px">C3</option>
								 	<option value="C4" style="font-size: 16px">C4</option>
								 	<option value="D" style="font-size: 16px">D</option>
								 	<option selected="selected" value="E" style="font-size: 16px">E</option>
								 	<option value="F" style="font-size: 16px">F</option>
								 	<option value="M" style="font-size: 16px">M</option>
								 	<option value="N" style="font-size: 16px">N</option>
								 	<option value="P" style="font-size: 16px">P</option>
								 	<option value=" " style="font-size: 16px"></option>
								</c:if>
								<c:if test="${examOrder.cfsqzjcxdh == 'F'}">
									<option value="A1" style="font-size: 16px">A1</option>
								 	<option value="A2" style="font-size: 16px">A2</option>
								 	<option value="A3" style="font-size: 16px">A3</option>
								 	<option value="B1" style="font-size: 16px">B1</option>
								 	<option value="B2" style="font-size: 16px">B2</option>
								 	<option value="C1" style="font-size: 16px">C1</option>
								 	<option value="C2" style="font-size: 16px">C2</option>
								 	<option value="C3" style="font-size: 16px">C3</option>
								 	<option value="C4" style="font-size: 16px">C4</option>
								 	<option value="D" style="font-size: 16px">D</option>
								 	<option value="E" style="font-size: 16px">E</option>
								 	<option selected="selected"  value="F" style="font-size: 16px">F</option>
								 	<option value="M" style="font-size: 16px">M</option>
								 	<option value="N" style="font-size: 16px">N</option>
								 	<option value="P" style="font-size: 16px">P</option>
								 	<option value=" " style="font-size: 16px"></option>
								</c:if>
								<c:if test="${examOrder.cfsqzjcxdh =='M'}">
									<option value="A1" style="font-size: 16px">A1</option>
								 	<option value="A2" style="font-size: 16px">A2</option>
								 	<option value="A3" style="font-size: 16px">A3</option>
								 	<option value="B1" style="font-size: 16px">B1</option>
								 	<option value="B2" style="font-size: 16px">B2</option>
								 	<option value="C1" style="font-size: 16px">C1</option>
								 	<option value="C2" style="font-size: 16px">C2</option>
								 	<option value="C3" style="font-size: 16px">C3</option>
								 	<option value="C4" style="font-size: 16px">C4</option>
								 	<option value="D" style="font-size: 16px">D</option>
								 	<option value="E" style="font-size: 16px">E</option>
								 	<option value="F" style="font-size: 16px">F</option>
								 	<option selected="selected" value="M" style="font-size: 16px">M</option>
								 	<option value="N" style="font-size: 16px">N</option>
								 	<option value="P" style="font-size: 16px">P</option>
								 	<option value=" " style="font-size: 16px"></option>
								</c:if>
								<c:if test="${examOrder.cfsqzjcxdh == 'N'}">
									<option value="A1" style="font-size: 16px">A1</option>
								 	<option value="A2" style="font-size: 16px">A2</option>
								 	<option value="A3" style="font-size: 16px">A3</option>
								 	<option value="B1" style="font-size: 16px">B1</option>
								 	<option value="B2" style="font-size: 16px">B2</option>
								 	<option value="C1" style="font-size: 16px">C1</option>
								 	<option value="C2" style="font-size: 16px">C2</option>
								 	<option value="C3" style="font-size: 16px">C3</option>
								 	<option value="C4" style="font-size: 16px">C4</option>
								 	<option value="D" style="font-size: 16px">D</option>
								 	<option value="E" style="font-size: 16px">E</option>
								 	<option value="F" style="font-size: 16px">F</option>
								 	<option value="M" style="font-size: 16px">M</option>
								 	<option selected="selected" value="N" style="font-size: 16px">N</option>
								 	<option value="P" style="font-size: 16px">P</option>
								 	<option value=" " style="font-size: 16px"></option>
								</c:if>
								<c:if test="${examOrder.cfsqzjcxdh == 'P'}">
									<option value="A1" style="font-size: 16px">A1</option>
								 	<option value="A2" style="font-size: 16px">A2</option>
								 	<option value="A3" style="font-size: 16px">A3</option>
								 	<option value="B1" style="font-size: 16px">B1</option>
								 	<option value="B2" style="font-size: 16px">B2</option>
								 	<option value="C1" style="font-size: 16px">C1</option>
								 	<option value="C2" style="font-size: 16px">C2</option>
								 	<option value="C3" style="font-size: 16px">C3</option>
								 	<option value="C4" style="font-size: 16px">C4</option>
								 	<option value="D" style="font-size: 16px">D</option>
								 	<option value="E" style="font-size: 16px">E</option>
								 	<option value="F" style="font-size: 16px">F</option>
								 	<option value="M" style="font-size: 16px">M</option>
								 	<option value="N" style="font-size: 16px">N</option>
								 	<option selected="selected" value="P" style="font-size: 16px">P</option>
								 	<option value=" " style="font-size: 16px"></option>
								</c:if>
								<c:if test="${examOrder.cfsqzjcxdh  == '' || examOrder.cfsqzjcxdh == null }">
									<option value="A1" style="font-size: 16px">A1</option>
								 	<option value="A2" style="font-size: 16px">A2</option>
								 	<option value="A3" style="font-size: 16px">A3</option>
								 	<option value="B1" style="font-size: 16px">B1</option>
								 	<option value="B2" style="font-size: 16px">B2</option>
								 	<option value="C1" style="font-size: 16px">C1</option>
								 	<option value="C2" style="font-size: 16px">C2</option>
								 	<option value="C3" style="font-size: 16px">C3</option>
								 	<option value="C4" style="font-size: 16px">C4</option>
								 	<option value="D" style="font-size: 16px">D</option>
								 	<option value="E" style="font-size: 16px">E</option>
								 	<option value="F" style="font-size: 16px">F</option>
								 	<option value="M" style="font-size: 16px">M</option>
								 	<option value="N" style="font-size: 16px">N</option>
								 	<option value="P" style="font-size: 16px">P</option>
								 	<option selected="selected"  value=" " style="font-size: 16px"></option>
								</c:if> 	 	
							</select>
							<input type="hidden"  value="${examOrder.cfsqzjcxdh}" name="cfsqzjcxdh" class="cfsqzjcxdh"> 
						</td>
				 		<td>手机:</td>
				 		<td>
				 		<input  type="text"  value="${examOrder.cfmobile}" class="cfmobile" disabled="disabled" style="color: gray;"/>
				 		<input type="hidden"  value="${examOrder.cfmobile}"   name="cfmobile" class="cfmobile">
				 		</td>
				 		<td>下一次预约日期:</td>
				 		<td >
				 		<input type="text" id="cfbirthday" value="${examOrder.cfnexttime}" name="cfnexttime"  onclick="WdatePicker({el:'cfbirthday',dateFmt:'yyyy-MM-dd'})" >
				        <span>
							<img onclick="WdatePicker({el:'cfbirthday',dateFmt:'yyyy-MM-dd'})"
								 src="<%=path%>/image/date.jpg"  align="absmiddle" style="padding-left: -15px">
						</span>
				         </td>
				 	</tr>
				 	<tr>
				 		<td>电话:</td>
				 		<td>
				 		<input value="${examOrder.cfphone}"  type="text"  class="cfphone" disabled="disabled" style="color: gray;"/>
				 		</td>
				 		<td>应收:</td>
				 		<td><input value="${examOrder.cfamount}"  type="text"  class="cfamount" disabled="disabled" style="color: gray;"/>
				 		<input type="hidden" name="cfamount" class="cfamount"> 
				 		</td>
				 		<td>已收:</td>
				 		<td>
							<input value="${examOrder.cfreceived}" type="text" class="cfreceived" disabled="disabled" style="color: gray;"/>
							<input type="hidden" name="cfreceived" class="cfreceived"> 
				 		</td>
				 	</tr>
				 	<tr>
				 		<td rowspan="5"></td>
				 		<td>优惠:</td>
				 		<td>
							<input  type="text" value="${examOrder.cffavorable}"  class="cffavorable" disabled="disabled" style="color: gray;"/>
							<input type="hidden" name="cffavorable" class="cffavorable"> 
				 		</td>
				 		<td>欠费:</td>
				 		<td>
							<input  type="text" value="${examOrder.cfarrearage}" class="cfarrearage" disabled="disabled" style="color: gray;"/>
							<input type="hidden" name="cfarrearage" class="cfarrearage"> 
				 		</td>
				 		<td>车型:</td>
				 		
				 		<td>
				 		<input type="hidden"  class="cfcarbyte">
				 		<select disabled="disabled" style="width: 150px;height: 32px" >
							<c:if test="${examOrder.cfcarbyte eq 1}">
							<option class="cfcarbyte" style="font-size: 16px">小车</option>
							</c:if>
							<c:if test="${examOrder.cfcarbyte eq 2}">
								<option class="cfcarbyte" style="font-size: 16px">大车</option>
							</c:if>
							<c:if test="${examOrder.cfcarbyte ne 1 && examOrder.cfcarbyte ne 2 }">
								<option class="cfcarbyte" style="font-size: 16px"></option>
							</c:if>

						</select>
						
					</td>
				 	</tr>
				 	<tr>
				 		<td>身份证号码:</td>
				 		<td>
				 			<input value="${examOrder.cfidcardno}" readonly="readonly" type="text" class="cfidcardno" name="cfidcardno"  style="color: gray;"/>
				 		</td>
				 		<td>性别:</td>
				 		<td>
				 			<select style="width: 150px;height: 32px" name="cfsex" >
				 				<c:if test="${examOrder.cfsex eq 1}">
					 				<option class="cfsex1"  selected="selected" value="1" style="font-size: 16px">男</option>
								 	<option class="cfsex2" value="2" style="font-size: 16px">女</option>
				 				</c:if>
							 	<c:if test="${examOrder.cfsex eq 2}">
					 				<option class="cfsex1"  value="1" style="font-size: 16px">男</option>
								 	<option class="cfsex2" selected="selected" value="2" style="font-size: 16px">女</option>
				 				</c:if>
				 				<c:if test="${examOrder.cfsex ne 2 && examOrder.cfsex ne 1}">
					 				<option class="cfsex1"  value="1" style="font-size: 16px">男</option>
								 	<option class="cfsex2"  value="2" style="font-size: 16px">女</option>
				 				</c:if>
							</select>
				 		</td>
				 		<td>推荐人:</td>
				 		<td >
				 			<input value="${examOrder.cftjr}"  type="text" name="cftjr" class="cftjr" value=""  style="color: gray;"/>
				 		</td>
				 	</tr>
				 	<tr class="notTr">
				 		<td>初考/补考:</td>
				 		<td>
				 			<select disabled="disabled" style="width: 150px;height: 32px" name="cfckbk">
				 			<c:if test="${examOrder.cfckbk eq 1}">
				 				<option selected="selected" value="1" style="font-size: 16px">初考</option>
							 	<option value="2" style="font-size: 16px">补考</option>
				 			</c:if>
							<c:if test="${examOrder.cfckbk eq 2}">
				 				<option value="1" style="font-size: 16px">初考</option>
							 	<option selected="selected" value="2" style="font-size: 16px">补考</option>
				 			</c:if> 	
							</select>
				 		</td>
				 		<td></td>
				 		<td>
				 		<c:if test="${examOrder.cfjnbjj ne 1}">
				 		<input  type="checkbox"  id="cfjnbjj"   style="color: gray;float: left;width: 30px;height:15px"/>
				 		<input type="hidden" class="cfjnbjj"   name="cfjnbjj" > 
				 		<div style="height: 30px;float: left;margin-top: -2px">技能表交接</div>
				 		</c:if>
				 		<c:if test="${examOrder.cfjnbjj eq 1}">
				 		<input checked="checked" type="checkbox"  id="cfjnbjj"   style="color: gray;float: left;width: 30px;height:15px"/>
				 		<input type="hidden" class="cfjnbjj"   name="cfjnbjj" > 
				 		<div style="height: 30px;float: left;margin-top: -2px">技能表交接</div>
				 		</c:if>
				 		</td>
				 		<td></td>
				 		<td colspan="2">
				 		
				 		<c:if test="${examOrder.cfdajj ne 1}">
				 		<input  type="checkbox"  id="cfdajj"  style="color: gray;float: left;width: 30px;height:15px"/>
				 		<input type="hidden"  class="cfdajj"  name="cfdajj"  > 
				 		<div style="height: 30px;float: left;margin-top: -2px">档案交接</div>
				 		</c:if>
				 		
				 		<c:if test="${examOrder.cfdajj eq 1}">
				 		<input checked="checked" type="checkbox"  id="cfdajj"  style="color: gray;float: left;width: 30px;height:15px"/>
				 		<input type="hidden"  class="cfdajj"  name="cfdajj"  > 
				 		<div style="height: 30px;float: left;margin-top: -2px">档案交接</div>
				 		</c:if>
				 		
				 		</td>
				 		<td></td>
				 	</tr>
				 	<tr>
				 		<td>备注:</td>
				 		<td colspan="2">
				 			<textarea name="cfremark" rows="5" cols="48">${examOrder.cfremark}</textarea>
				 		</td>
				 	</tr>
				 	<tr>
				 		<td>创建者:</td>
				 		<td>
				 			<input value="${examOrder.fcreateName}"  type="text" name="name" disabled="disabled" style="color: gray;"/>
				 		</td>
				 		<td>创建时间:</td>
				 		<td colspan="2">
				 			<input  value="${examOrder.fcreatetime}" type="text" name="cfaddress" disabled="disabled" value=""  style="color: gray;"/>
				 		</td>
				 	</tr>
				 	
				</table>
		<div class="div_tj" style="height: 100px;margin-top: 30px" >
					<div>
						<input type="submit" onclick="return submitCheck()" class="input_submit bc" value="">
					</div>
					<div>
						<input type="button" class="input_submit fh" <%--onclick="history.back(-1)"--%> value="" />
					</div>
					<input class="state" type="hidden" value="${examOrder.cfbilltype-1}" >
				</div>
			</form>
		</div>	 	
		</c:if>
		
		
		
	</div>
</div>
</body>
<script type="text/javascript" src="<%=path%>/JQuery/jquery-1.8.2.js"></script>
<%@ include file="/WEB-INF/JSP/ajax.jsp"%>
<script type="text/javascript">

    $(document).ready(function () {
        var type = "${type}";
        if (type == '0' || type == '' || type == null) {

        } else {
            //alert("添加成功");
            editAlert();
        }
    })

	$('.cfbilltype').live('change',function(){
		var state = $(this).val()
		if(state == 2){
			$('.state').val('1')
			$('#index').val('1')
            $('.cffavorable').val("")
            $('.cfarrearage').val("")
            $('.cfreceived').val("")
            $('.cftjr').val("")
            $('.cfamount').val("")
            $('.cfidcardno').val("")
            $('.cfbmsj').val("")
            $('.cfclazzid').val("")
            $('.student').val("")
            $('.cfstudentname').val("")
            $('.cfstudentid').val("")
            $('.cfsqzjcxdh').val("")
            $('.cfsqzjcxdh').html("")
            $('.cfmobile').val("")
            $('.cfclazzName').val("")
            $('.cfsex1').attr('selected',':selected')
            $('.cfcarbyte').val(1)
            $('.cfcarbyte').html('小车')
            $('.cfphone').val("")
            $('#cfckbk').find("option[value='1']").attr("selected",true);
            $('#cfjnbjj').attr('checked',false)
            $('#cfdajj').attr('checked',false)
            $('.remark').val("")
			$('#studebntList').html("<div class='loading'></div>");
			$.ajax({
	            url: '<%=path2%>/DrivingSys/getPageEnrol',
	            type: "post",
	            data: {
	                'pindex': 0,
	                'beginTime': beginTime.val(),
	                'endTime': endTime.val(),
	                'state': 1,
	                'type': "yy"
	            },
	            dataType: "json",
	            success: function (json) {
	                $('#studebntList').html(myTemplate(json));
	                $('#totalPage').val(json.pb);
	            },
	            error: function () {
	                alert('Error');
	            }
	        });
            $('.name1').val("")
		}else if(state == 3){
			$('.state').val('2')
			$('#index').val('1')
            $('.cffavorable').val("")
            $('.cfarrearage').val("")
            $('.cfreceived').val("")
            $('.cftjr').val("")
            $('.cfamount').val("")
            $('.cfidcardno').val("")
            $('.cfbmsj').val("")
            $('.cfclazzid').val("")
            $('.student').val("")
            $('.cfstudentname').val("")
            $('.cfstudentid').val("")
            $('.cfsqzjcxdh').val("")
            $('.cfsqzjcxdh').html("")
            $('.cfmobile').val("")
            $('.cfclazzName').val("")
            $('.cfsex1').attr('selected',':selected')
            $('.cfcarbyte').val(1)
            $('.cfcarbyte').html('小车')
            $('.cfphone').val("")
            $('.remark').val("")
            $('#cfckbk').find("option[value='1']").attr("selected",true);
            $('#cfjnbjj').attr('checked',false)
            $('#cfdajj').attr('checked',false)
			$('#studebntList').html("<div class='loading'></div>");
			$.ajax({
	            url: '<%=path2%>/DrivingSys/getPageEnrol',
	            type: "post",
	            data: {
	                'pindex': 0,
	                'beginTime': beginTime.val(),
	                'endTime': endTime.val(),
	                'state': 2,
	                'type': "yy"
	            },
	            dataType: "json",
	            success: function (json) {
	                $('#studebntList').html(myTemplate(json));
	                $('#totalPage').val(json.pb);
	            },
	            error: function () {
	                alert('Error');
	            }
			})
            $('.name1').val("")
		}else{
            $('.name1').val("")
			$('.state').val('3')
			$('#index').val('1')
            $('.cffavorable').val("")
            $('.cfarrearage').val("")
            $('.cfreceived').val("")
            $('.cftjr').val("")
            $('.cfamount').val("")
            $('.cfidcardno').val("")
            $('.cfbmsj').val("")
            $('.cfclazzid').val("")
            $('.student').val("")
            $('.cfstudentname').val("")
            $('.cfstudentid').val("")
            $('.cfsqzjcxdh').val("")
            $('.cfsqzjcxdh').html("")
            $('.cfmobile').val("")
            $('.cfclazzName').val("")
            $('.remark').val("")
            $('.cfsex1').attr('selected',':selected')
            $('.cfcarbyte').val(1)
            $('.cfcarbyte').html('小车')
            $('.cfphone').val("")
            $('#cfckbk').find("option[value='1']").attr("selected",true);
            $('#cfjnbjj').attr('checked',false)
            $('#cfdajj').attr('checked',false)
			$('#studebntList').html("<div class='loading'></div>");
			$.ajax({
	            url: '<%=path2%>/DrivingSys/getPageEnrol',
	            type: "post",
	            data: {
	                'pindex': 0,
	                'beginTime': beginTime.val(),
	                'endTime': endTime.val(),
	                'state': 3,
	                'type': "yy"
	            },
	            dataType: "json",
	            success: function (json) {
	                $('#studebntList').html(myTemplate(json));
	                $('#totalPage').val(json.pb);
	            },
	            error: function () {
	                alert('Error');
	            }
			})

		}
		/* $('.state').val() */
	})
	

	//提交复选框
	function submitCheck() {
		
		if($('#cfvip').attr('checked')){
			$('.cfvip').val(1)
		}else{
			$('.cfvip').val(0)
		}
		if($('#cfjnbjj').attr('checked')){
			$('.cfjnbjj').val(1)
		}else{
			$('.cfjnbjj').val(0)
		}
		if($('#cfdajj').attr('checked')){
			$('.cfdajj').val(1)
		}else{
			$('.cfdajj').val(0)
		}

		if($('.student').val() == ''){
		    alert('请选择学员编码')
			return false;
		}
        if($('.cfbilltype').val() != 2){
		    if($('.cfarrearage').val() != 0){
		        alert('该学员已欠费,无法考试预约')
                return false;
			}
		}
		if($('#date').val() == ''){
            alert('请选择日期')
            return false;
		}
		if($('.cftjr').val() == ''){
		    alert("请选择推荐人")
            return false;
		}
		if($('.cfclazzName').val() == ''){
            alert("请选择班级")
            return false;
		}
        $('form').submit(function() {
            if(typeof jQuery.data(this, "disabledOnSubmit") == 'undefined') {
                jQuery.data(this, "disabledOnSubmit", { submited: true });
                $('input[type=submit], input[type=button]', this).each(function() {
                    $(this).attr("disabled", "disabled");
                });
                return true;
            }
            else
            {
                return false;
            }
        })
	}

    /*//防止表单重复提交
    $('form').submit(function() {
        if(typeof jQuery.data(this, "disabledOnSubmit") == 'undefined') {
            jQuery.data(this, "disabledOnSubmit", { submited: true });
            $('input[type=submit], input[type=button]', this).each(function() {
                $(this).attr("disabled", "disabled");
            });
            return true;
        }
        else
        {
            return false;
        }
    });*/
	
	$('.btn').click(function(){
		$('#modal-overlay').css('visibility','hidden')
		$('.modal-data').css('visibility','hidden')
		$('.modal-data1').css('visibility','hidden')
		$('.modal-data2').css('visibility','hidden')
	})
		
	
	$('.student').click(function(){
			$('#modal-overlay').css('visibility','visible')
			$('.modal-data').css('visibility','visible')
			$('.page').show()
	})
		
	
	$('.subtn').click(function(){
		
		  var spCodesTemp = "";
	      $('input:checkbox[name=student]:checked').each(function(i){
	       if(0==i){
	        spCodesTemp = $(this).val();
	       }else{
	        spCodesTemp += (","+$(this).val());
	       }
	      });
	      spCodesTemp = spCodesTemp.split(",")
		if(spCodesTemp == "null" || spCodesTemp == ""){
	          alert("请选择学员")
		}else{
	      $.ajax({
			    url:'<%=path%>/DrivingSys/selStudentById', 
			    type: "post",
			    data:{'fid':spCodesTemp[0]},
			    dataType:"json",         	
			    success: function(json) {
			    	$('.cffavorable').val(json.cffavorable)
			    	$('.cfarrearage').val(json.cfarrearage)
			    	$('.cfreceived').val(json.cfreceived)
			    	$('.cftjr').val(json.cftjrName)
	            	$('.cfamount').val(json.cfamount)
	            	$('.cfidcardno').val(json.cfidcardno)
	            	$('.cfbmsj').val(json.cfrxsj)
					$('.cfclazzid').val(json.cfclazzid)
	            	$('.student').val(json.fnumber)
	            	$('.cfstudentname').val(json.fnameL2)
	            	$('.cfstudentid').val(json.fid)
	            	$('.cfsqzjcxdh').val(json.cfslzjcxdh)
	            	$('.cfsqzjcxdh').html(json.cfslzjcxdh)
	            	$('.cfmobile').val(json.cfsjhm)
	            	$('.cfclazzName').val(json.cfclazzName)
                    $('.remark').val(json.cfremark)
	            	if(json.cfsex == 1){
	            		$('.cfsex1').attr('selected',':selected')
	            	}else{
	            		$('.cfsex2').attr('selected',':selected')
	            	}
			    	if(json.cfslzjcxdh[0] == 'A'){
			    		$('.cfcarbyte').val(2)
			    		$('.cfcarbyte').html('大车')
			    	}else if(json.cfslzjcxdh[0] == 'B'){
			    		$('.cfcarbyte').val(2)
			    		$('.cfcarbyte').html('大车')
			    	}else{
			    		$('.cfcarbyte').val(1)
			    		$('.cfcarbyte').html('小车')
			    	}
	            	$('.cfphone').val(json.cflxdh)
                    if($('.cfbilltype').val() == 2){
                        if(json.cfkmykss > 0){
                            $('#cfckbk').find("option[value='2']").attr("selected",true);
                        }else{
                            $('#cfckbk').find("option[value='1']").attr("selected",true);
                        }
                    }else if($('.cfbilltype').val() == 3){
                        if(json.cfkmekss > 0){
                            $('#cfckbk').find("option[value='2']").attr("selected",true);
                        }else{
                            $('#cfckbk').find("option[value='1']").attr("selected",true);
                        }
                    }else {
                        if(json.cfkmskss > 0){
                            $('#cfckbk').find("option[value='2']").attr("selected",true);
                        }else{
                            $('#cfckbk').find("option[value='1']").attr("selected",true);
                        }
                    }
                    if(json.cfjnbjj == 1)
                        $('#cfjnbjj').attr('checked',true)
                    if(json.cfdajj == 1)
                        $('#cfdajj').attr('checked',true)
                    var img = document.getElementById("images");
                        img.src = 'selectStudentPhoto'+'?t='+Math.random()
	            	/*$('.photo').attr('src','<%=path%>/DrivingSys/selectStudentPhoto')*/
	            	$('#modal-overlay').css('visibility','hidden')
					$('.modal-data').css('visibility','hidden')

				},  
				error: function(){alert('Error');} 
	 			});

        }
	})
	
	
	
	$('.clazz').click(function(){
		$('#modal-overlay').css('visibility','visible')
		$('.modal-data1').css('visibility','visible')
	})
	
	
	$('.findBtn').click(function(){
	 var name=$('.name').val()
		 $.ajax({
			    url:'<%=path%>/DrivingSys/selClazzByName', 
			    type: "post",
			    data:{'name':name},
			    dataType:"json",         	
			    success: function(json) {
	            var str=''
	            for(var i=0;i<json.length;i++) {
	               str+='<tr class="clazzData" style="margin-top: 45px" ><td><input style="width: 15px;height: 15px" '
	               str+='type="checkbox" name="train"  value="'+json[i].fid+'"></td>'
	               if( json[i].fnumber != null){
	        	   str+='<td>'+json[i].fnumber+'</td><td>'+json[i].fnameL2+'</td>'
	               }else{
	            	str+='<td></td><td>'+json[i].fnameL2+'</td>'  
	               }
	               if(json[i].fsimplename!=null){
	            	str+='<td>'+json[i].cfprice+'</td><td>'+json[i].fsimplename+'</td>'	
	               }else{
	                str+='<td>'+json[i].cfprice+'</td><td></td>'   
	               }
	               if(json[i].fdescriptionL2!=null){
		            	str+='<td>'+json[i].fdescriptionL2+'</td><td>'+json[i].fcreatetime+'</td>'	
		               }else{
		                str+='<td></td><td>'+json[i].fcreatetime+'</td>'   
		               }
        		   str+='<td>'+json[i].createName+'</td><td>'+json[i].flastupdatetime+'</td>'
        		   str+='<td>'+json[i].updateName+'</td><td>'+json[i].cfficompanyName+'</td>'
        		   if(json[i].cfsycl!=null){
        			   str+='<td>'+json[i].cfsycl+'</td>'
        		   }else{
        			   str+='<td></td>' 
        		   }	   
        		   if (json[i].cfksf == '1'){
        		   str+='<td><input style="width: 15px;height: 15px" type="checkbox" checked="checked" disabled="disabled"></td>'  
        		   } else {
        			str+='<td><input style="width: 15px;height: 15px" type="checkbox" disabled="disabled"></td>	'	   
        		   }
	               if (json[i].cflc == '1'){
	        		   str+='<td><input style="width: 15px;height: 15px" type="checkbox" checked="checked" disabled="disabled"></td>'  
	        		   } else {
	        			str+='<td><input style="width: 15px;height: 15px" type="checkbox" disabled="disabled"></td>	'	   
	        	   }
	               if(json[i].cfvip=='1'){
	        		   str+='<td><input style="width: 15px;height: 15px" type="checkbox" checked="checked" disabled="disabled"></td>'  
	        		   }else{
	        			str+='<td><input style="width: 15px;height: 15px" type="checkbox" disabled="disabled"></td>	'	   
	        	   }
	               if(json[i].cftx=='1'){
	        		   str+='<td><input style="width: 15px;height: 15px" type="checkbox" checked="checked" disabled="disabled"></td>'  
	        		   }else{
	        			str+='<td><input style="width: 15px;height: 15px" type="checkbox" disabled="disabled"></td>	'	   
	        	   }
	               str+='<td>启用</td></tr>'
	            }
	            $(".head1 tr:not(':first')").remove()
	            $('.head1').append(str)
				},  
 				error: function(){alert('Error');} 
 	 			});
		
	})		
			
	
	$('.subtn1').click(function(){
		  var spCodesTemp = "";
	      $('input:checkbox[name=train]:checked').each(function(i){
	       if(0==i){
	        spCodesTemp = $(this).val();
	       }else{
	        spCodesTemp += (","+$(this).val());
	       }
	      });
	      spCodesTemp = spCodesTemp.split(",")
        if(spCodesTemp == "null" || spCodesTemp == ""){
            alert("请选择班级")
        }else {
            $.ajax({
                url: '<%=path%>/DrivingSys/selClazzById',
                type: "post",
                data: {'id': spCodesTemp[0]},
                dataType: "json",
                success: function (json) {
                    $('.cfclazzName').val(json[0].fnameL2)
                    $('.cfclazzid').val(json[0].fid)
                    $('#modal-overlay').css('visibility', 'hidden')
                    $('.modal-data1').css('visibility', 'hidden')
                },
                error: function () {
                    alert('Error');
                }
            });
        }
	      
		
	})


    /*
        $(function(){
            $(':checkbox[type="checkbox"]').each(function(){
                $(this).click(function(){
                    if($(this).attr('checked')){
                        $(':checkbox[type="checkbox"]').removeAttr('checked');
                        $(this).attr('checked','checked');
                    }
                });
            });
        });
         */
    $('.studentData').live('dblclick',function(){
        spCodesTemp = $(this).find('input').val()
        $.ajax({
            url:'<%=path%>/DrivingSys/selStudentById',
            type: "post",
            data:{'fid':spCodesTemp},
            dataType:"json",
            success: function(json) {
                $('.cffavorable').val(json.cffavorable)
                $('.cfarrearage').val(json.cfarrearage)
                $('.cfreceived').val(json.cfreceived)
                $('.cftjr').val(json.cftjrName)
                $('.cfamount').val(json.cfamount)
                $('.cfidcardno').val(json.cfidcardno)
                $('.cfbmsj').val(json.cfrxsj)
                $('.cfclazzid').val(json.cfclazzid)
                $('.student').val(json.fnumber)
                $('.cfstudentname').val(json.fnameL2)
                $('.cfstudentid').val(json.fid)
                $('.cfsqzjcxdh').val(json.cfslzjcxdh)
                $('.cfsqzjcxdh').html(json.cfslzjcxdh)
                $('.cfmobile').val(json.cfsjhm)
                $('.cfclazzName').val(json.cfclazzName)
				$('.remark').val(json.cfremark)
                if(json.cfsex == 1){
                    $('.cfsex1').attr('selected',':selected')
                }else{
                    $('.cfsex2').attr('selected',':selected')
                }
                if(json.cfslzjcxdh[0] == 'A'){
                    $('.cfcarbyte').val(2)
                    $('.cfcarbyte').html('大车')
                }else if(json.cfslzjcxdh[0] == 'B'){
                    $('.cfcarbyte').val(2)
                    $('.cfcarbyte').html('大车')
                }else{
                    $('.cfcarbyte').val(1)
                    $('.cfcarbyte').html('小车')
                }
                $('.cfphone').val(json.cflxdh)
				if($('.cfbilltype').val() == 2){
                    if(json.cfkmykss > 0){
                        $('#cfckbk').find("option[value='2']").attr("selected",true);
                    }else{
                        $('#cfckbk').find("option[value='1']").attr("selected",true);
                    }
                }else if($('.cfbilltype').val() == 3){
                    if(json.cfkmekss > 0){
                        $('#cfckbk').find("option[value='2']").attr("selected",true);
                    }else{
                        $('#cfckbk').find("option[value='1']").attr("selected",true);
                    }
				}else {
                    if(json.cfkmskss > 0){
                        $('#cfckbk').find("option[value='2']").attr("selected",true);
                    }else{
                        $('#cfckbk').find("option[value='1']").attr("selected",true);
                    }
                }

                if(json.cfjnbjj == 1)
                    $('#cfjnbjj').attr('checked',true)
                if(json.cfdajj == 1)
                    $('#cfdajj').attr('checked',true)
                var img = document.getElementById("images");
                    img.src = 'selectStudentPhoto'+'?t='+Math.random()
                /*$('.photo').attr('src','<%=path%>/DrivingSys/selectStudentPhoto')*/
                $('#modal-overlay').css('visibility','hidden')
                $('.modal-data').css('visibility','hidden')
            },
            error: function(){alert('Error');}
        });


    })
	
	$('.input_submit.fh').click(function(){
        parent.closeSelectCard()

//        location.href='<%=path%>/DrivingSys/selectExamOrder/look.action'
	})

	$('.clazzData').live('dblclick',function(){
        spCodesTemp = $(this).find('input').val()
        $.ajax({
            url: '<%=path%>/DrivingSys/selClazzById',
            type: "post",
            data: {'id': spCodesTemp},
            dataType: "json",
            success: function (json) {
                $('.cfclazzName').val(json[0].fnameL2)
                $('.cfclazzid').val(json[0].fid)
                $('#modal-overlay').css('visibility', 'hidden')
                $('.modal-data1').css('visibility', 'hidden')
            },
            error: function () {
                alert('Error');
            }
        });
	})

    //单击选中复选框
    $("tr:not(.notTr)").live('click',function(){
        var check = $(this).find("input[type='checkbox']");
        if(check){
            var flag = check[0].checked;
            if(flag){
                check[0].checked = false;
            }else{
                check[0].checked = true;
            }
        }
        $("tr input[type='checkbox']").attr("checked", false);
        $(this).find("input[type='checkbox']").attr("checked", true);
    });

    //阻止复选框进行冒泡事件
    $("tr input[type='checkbox']").live('click',function(e){
        e.stopPropagation();
    });


</script>
</html>